import type { TableColumnCtx, TableProps } from "element-plus";
import { defineComponent } from "vue";

interface IExtraColumnsProps {
  hidden?: boolean;
  slot?: String;
  renderHeader?: ReturnType<typeof defineComponent>;
  render?: ReturnType<typeof defineComponent>;
}

interface IPiginationProps {
  total: number;
  size: number;
  current: number;
  pages: number;
}

interface ITableProps<T = any> extends TableProps<T> {
  columns: Array<Partial<TableColumnCtx<T>> & IExtraColumnsProps>; // 列配置
  pigination?: IPiginationProps; // 分页配置
}

interface ISortChangeParams {
  column: any;
  prop: string;
  order: any;
}

interface IFilterChangeParams {
  [key: string]: string[];
}

export type { IFilterChangeParams, ISortChangeParams, ITableProps };
